package com.lee.integrate;

import com.lee.entity.User;
import com.lee.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by lee on 2017/3/14.
 */
@Service
public class UserService {

    @Autowired
    UserMapper mUserMapper;

    public UserService() {
        System.out.println("UserService Constructor. ");
    }

    public void save() {
        System.out.println("save");

        mUserMapper.save(new User("name" + System.currentTimeMillis() % 10000,
                String.valueOf(System.currentTimeMillis() % 100)));
    }

}
